package com.weirdor.mongo.exception.code;

/**
 * 内部错误
 * @Author werdor
 * @Date 2021/11/8 3:55 下午
 **/
public  enum InternalErrorCode implements BaseErrorCode {

    ERROR(500000, "内部未知错误"),

    DATA_ERROR(500001, "内部数据错误"), DATA_MISSING(500002, "缺失内部数据"), DATA_INCOMPLETE(500003, "内部数据不完整"),

    NET_ERROR(500004, "网络异常"), SERVICE_UNAVAILABLE(500005, "服务不可用"),

    ARGUMENT_ERROR(500006, "参数错误"),;
    // =================================================

    private int code;
    private String message;

    private InternalErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "错误码：" + code + ", 错误信息：" + message;
    }
}